package user

import (
	"enjoy_wangyashuo/base"
	"enjoy_wangyashuo/formdata"
	"enjoy_wangyashuo/internal/server"
	"github.com/gin-gonic/gin"
)

func CreateAddr(c *gin.Context) {
	var data formdata.CreateUserAddr
	if err := c.ShouldBind(&data); err != nil {
		base.RespData(c, nil, err)
		return
	}
	err := server.CreateAddr(data, c)
	base.RespData(c, "", err)
}
func GetAddrListByUserId(c *gin.Context) {
	list, err := server.GetAddRListByUserId(c)
	base.RespData(c, list, err)
}
